package gui;

import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;

import javax.swing.JButton;

@SuppressWarnings("serial")
public class KnotenButton extends JButton {

  private int zeile;
  private int spalte;

  public KnotenButton(int spalte, int zeile) {
    
    setSpalte(spalte);
    setZeile(zeile);
    init();
  }

  private void init() {

    setMaximumSize(new Dimension(5, 5));
    setMinimumSize(new Dimension(3, 3));
    setSize(new Dimension(5, 5));

    setPreferredSize(new Dimension(10, 10));
    setFont(new Font("Serif", Font.BOLD, 12));
    setText("0");
    setMargin(new Insets(1, 1, 1, 1));

  }

  public int getZeile() {
    return zeile;
  }

  public int getSpalte() {
    return spalte;
  }

  public void setZeile(int zeile) {
    this.zeile = zeile;
  }

  public void setSpalte(int spalte) {
    this.spalte = spalte;
  }

}
